const userState = {
    BrotherToYounger: '', // 哥哥对弟弟说
    YoungerToBrother: '', // 弟弟对哥哥说
}

function userReducer(state, action) {
    switch (action.type) {
        case 'updateUser':
            return {
                ...state, user: {
                    ...state.user,
                    ...action.payload
                }
            }
            break;
        default:
            return state
            break;
    }
}

export {
    userReducer,
    userState
}